<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/5/30
 * Time: 16:14
 */

namespace App\LogicService;

use App\LogicService\Contracts\MedicalComplicationPromptLogicContract;
use App\Models\MedicalComplicationPrompt;


class MedicalComplicationPromptLogic extends BaseLogic implements MedicalComplicationPromptLogicContract
{

    public function store($record_id, $prompt)
    {

    }

    public function show($record_id)
    {
        $complicationPrompt = MedicalComplicationPrompt::firstOrCreate(['record_id' => $record_id]);

        return $complicationPrompt;

    }


    /**
     * @param $record_id
     * @param $prompt
     * @return mixed
     */
    public function update($record_id, $prompt)
    {
        $complicationPrompt = MedicalComplicationPrompt::firstOrCreate(['record_id' => $record_id]);
        $complicationPrompt->prompt = $prompt;
        $complicationPrompt->save();

        return $complicationPrompt;
    }


}